#include "mainwindow.h"
#include <QHBoxLayout>
#include <QWidget>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    QWidget *centralWidget = new QWidget(this);
    QHBoxLayout *layout = new QHBoxLayout(centralWidget);

    m_glWidget = new OpenGLWidget(this);
    m_controlWidget = new ControlWidget(m_glWidget, this);

    layout->addWidget(m_glWidget, 1);
    layout->addWidget(m_controlWidget);

    centralWidget->setLayout(layout);
    setCentralWidget(centralWidget);

    resize(800, 600);
    setWindowTitle("OpenGL Cube Demo");
}
